package com.itheima.case2.dao;

import com.itheima.case2.pojo.po.User;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

public interface UserMapper1 {
    @Select("select * from t_user where username=#{username} and password=#{password}")
    User login(User user);
    @Select("select * from t_user where username=#{username}")
    User queryUserByUsername(@Param("username") String username);
    //注册
    @Insert("insert into t_user values(null,#{username},#{password},null,#{email},now(),now())")
    void register(User user);
}
